<template>
 <div>
       <Form inline class="ivu-mb-16" :label-width="70">
           <FormItem class="ivu-mb-0" label="日期：">
        <DatePicker type="daterange" v-width="'100%'" :value="day" format="yyyy/MM/dd" v-model="data.date" placeholder="日期选择" element-id="date" />
        </FormItem>
        <FormItem class="ivu-mb-0" label="维度：">
        <Select style="width:100px;">
          <Option value="day">日</Option>
          <Option value="month">月</Option>
          <Option value="year">年</Option>
        </Select>
        </FormItem>
        </Form>
    <Table :columns="columns" :data="data" row-key="id" :loading="loading" border></Table>
     <div class="ivu-mt iuv-text-center">
            <Page :total="100" show-elevator show-sizer show-total></Page>
        </div>
    </div>
</template>
 <script>
    export default {
        name: 'manage',
        data () {
            return {
                day: ['2016-01-01', '2016-02-15'],
                loading: false,
                columns: [
                    {
                        title: '日期',
                        key: 'date',
                        fixed: 'left',
                        width: 118
                    },
                    {
                        title: '诊室',
                        key: 'room',
                        fixed: 'left',
                        tree: true,
                        width: 118
                    },
                    {
                        title: '总挂号',
                        key: 'total'
                    },
                    {
                        title: '咨询号',
                        key: 'Consultation'
                    },
                    // {
                    //     title: '正常挂号',
                    //     key: 'normal'
                    // },
                    {
                        title: '流失',
                        key: 'loss'
                    },
                    {
                        title: '流失率',
                        key: 'firstRate'
                    },
                    {
                        title: '初诊人数',
                        key: 'firstPerson'
                    },
                    {
                        title: '复诊人数',
                        key: 'repeated'
                    },
                    {
                        title: '就诊人数',
                        key: 'arrival'
                    },
                    {
                        title: '上月就诊数',
                        key: 'lastMonth',
                        width: 110
                    },
                    {
                        title: '断诊率',
                        key: 'diagnosis'
                    },
                    {
                        title: '介绍号',
                        key: 'introduce'
                    }
                    // {
                    //     title: '住院人数',
                    //     key: 'HospitalizationPerson'
                    // },
                    // {
                    //     title: '留观人数',
                    //     key: 'observation'
                    // }
                ],
                data: [
                    {
                        id: 100,
                        date: '2019-03-03',
                        room: '诊室汇总',
                        total: 98,
                        Consultation: 10,
                        normal: 60,
                        loss: 21,
                        firstRate: '5.6%',
                        firstPerson: 36,
                        repeated: 65,
                        arrival: 101,
                        lastMonth: 69,
                        diagnosis: '3.6%',
                        introduce: 9,
                        HospitalizationPerson: 6,
                        observation: 8,
                        children: [
                            {
                                id: 10010,
                                date: '2019-03-03',
                                room: '一诊',
                                total: 40,
                                Consultation: 4,
                                normal: 60,
                                loss: 21,
                                firstRate: '5.6%',
                                firstPerson: 36,
                                repeated: 65,
                                arrival: 101,
                                lastMonth: 69,
                                diagnosis: '3.6%',
                                introduce: 9,
                                HospitalizationPerson: 6,
                                observation: 8
                            },
                            {
                                id: 10020,
                                date: '2019-03-03',
                                room: '二诊',
                                total: 30,
                                Consultation: 3,
                                normal: 60,
                                loss: 21,
                                firstRate: '5.6%',
                                firstPerson: 36,
                                repeated: 65,
                                arrival: 101,
                                lastMonth: 69,
                                diagnosis: '3.6%',
                                introduce: 9,
                                HospitalizationPerson: 6,
                                observation: 8
                            },
                            {
                                id: 10030,
                                date: '2019-03-03',
                                room: '三诊',
                                total: 28,
                                Consultation: 3,
                                normal: 60,
                                loss: 21,
                                firstRate: '5.6%',
                                firstPerson: 36,
                                repeated: 65,
                                arrival: 101,
                                lastMonth: 69,
                                diagnosis: '3.6%',
                                introduce: 9,
                                HospitalizationPerson: 6,
                                observation: 8
                            }
                        ]
                    },
                    {
                        id: 101,
                        date: '2019-03-02',
                        room: '诊室汇总',
                        total: 98,
                        Consultation: 10,
                        normal: 60,
                        loss: 21,
                        firstRate: '6.1%',
                        firstPerson: 36,
                        repeated: 65,
                        arrival: 101,
                        lastMonth: 69,
                        diagnosis: '3.6%',
                        introduce: 9,
                        HospitalizationPerson: 6,
                        observation: 8
                    },
                    {
                        id: 102,
                        date: '2019-03-01',
                        room: '诊室汇总',
                        total: 98,
                        Consultation: 10,
                        normal: 60,
                        loss: 21,
                        firstRate: '5.1%',
                        firstPerson: 36,
                        repeated: 65,
                        arrival: 101,
                        lastMonth: 69,
                        diagnosis: '3.6%',
                        introduce: 9,
                        HospitalizationPerson: 6,
                        observation: 8
                    }
                ]
            }
        }
    }
</script>
